package com.project.controller;

import com.project.bean.PowerBean;
import com.project.service.IPowerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Set;

@RestController
@RequestMapping("power")
public class PowerController {
    @Autowired
    private IPowerService service;
    @RequestMapping("findAll")
    public List<PowerBean> findALL(){
        return service.findALL();
    }
    @RequestMapping("findByRole")
    public Set<PowerBean> findByRole(Integer[] roleId){
        return service.findByRole(roleId);
    }
}
